package com.sunny.fetch.pojo;

import javax.persistence.*;

@Table(name = "f_fut_holding")
public class FFutHolding {
    @Id
    private Long tid;

    /**
     * 交易日期
     */
    @Column(name = "trade_date")
    private String tradeDate;

    /**
     * 合约代码或类型
     */
    private String symbol;

    /**
     * 期货公司会员简称
     */
    private String broker;

    /**
     * 成交量
     */
    private Integer vol;

    /**
     * 成交量变化
     */
    @Column(name = "vol_chg")
    private Integer volChg;

    /**
     * 持买仓量
     */
    @Column(name = "long_hld")
    private Integer longHld;

    /**
     * 持买仓量变化
     */
    @Column(name = "long_chg")
    private Integer longChg;

    /**
     * 持卖仓量
     */
    @Column(name = "short_hld")
    private Integer shortHld;

    /**
     * 持卖仓量变化
     */
    @Column(name = "short_chg")
    private Integer shortChg;

    /**
     * 交易所
     */
    private String exchange;

    public FFutHolding(Long tid, String tradeDate, String symbol, String broker, Integer vol, Integer volChg, Integer longHld, Integer longChg, Integer shortHld, Integer shortChg, String exchange) {
        this.tid = tid;
        this.tradeDate = tradeDate;
        this.symbol = symbol;
        this.broker = broker;
        this.vol = vol;
        this.volChg = volChg;
        this.longHld = longHld;
        this.longChg = longChg;
        this.shortHld = shortHld;
        this.shortChg = shortChg;
        this.exchange = exchange;
    }

    public FFutHolding() {
        super();
    }

    /**
     * @return tid
     */
    public Long getTid() {
        return tid;
    }

    /**
     * @param tid
     */
    public void setTid(Long tid) {
        this.tid = tid;
    }

    /**
     * 获取交易日期
     *
     * @return trade_date - 交易日期
     */
    public String getTradeDate() {
        return tradeDate;
    }

    /**
     * 设置交易日期
     *
     * @param tradeDate 交易日期
     */
    public void setTradeDate(String tradeDate) {
        this.tradeDate = tradeDate;
    }

    /**
     * 获取合约代码或类型
     *
     * @return symbol - 合约代码或类型
     */
    public String getSymbol() {
        return symbol;
    }

    /**
     * 设置合约代码或类型
     *
     * @param symbol 合约代码或类型
     */
    public void setSymbol(String symbol) {
        this.symbol = symbol;
    }

    /**
     * 获取期货公司会员简称
     *
     * @return broker - 期货公司会员简称
     */
    public String getBroker() {
        return broker;
    }

    /**
     * 设置期货公司会员简称
     *
     * @param broker 期货公司会员简称
     */
    public void setBroker(String broker) {
        this.broker = broker;
    }

    /**
     * 获取成交量
     *
     * @return vol - 成交量
     */
    public Integer getVol() {
        return vol;
    }

    /**
     * 设置成交量
     *
     * @param vol 成交量
     */
    public void setVol(Integer vol) {
        this.vol = vol;
    }

    /**
     * 获取成交量变化
     *
     * @return vol_chg - 成交量变化
     */
    public Integer getVolChg() {
        return volChg;
    }

    /**
     * 设置成交量变化
     *
     * @param volChg 成交量变化
     */
    public void setVolChg(Integer volChg) {
        this.volChg = volChg;
    }

    /**
     * 获取持买仓量
     *
     * @return long_hld - 持买仓量
     */
    public Integer getLongHld() {
        return longHld;
    }

    /**
     * 设置持买仓量
     *
     * @param longHld 持买仓量
     */
    public void setLongHld(Integer longHld) {
        this.longHld = longHld;
    }

    /**
     * 获取持买仓量变化
     *
     * @return long_chg - 持买仓量变化
     */
    public Integer getLongChg() {
        return longChg;
    }

    /**
     * 设置持买仓量变化
     *
     * @param longChg 持买仓量变化
     */
    public void setLongChg(Integer longChg) {
        this.longChg = longChg;
    }

    /**
     * 获取持卖仓量
     *
     * @return short_hld - 持卖仓量
     */
    public Integer getShortHld() {
        return shortHld;
    }

    /**
     * 设置持卖仓量
     *
     * @param shortHld 持卖仓量
     */
    public void setShortHld(Integer shortHld) {
        this.shortHld = shortHld;
    }

    /**
     * 获取持卖仓量变化
     *
     * @return short_chg - 持卖仓量变化
     */
    public Integer getShortChg() {
        return shortChg;
    }

    /**
     * 设置持卖仓量变化
     *
     * @param shortChg 持卖仓量变化
     */
    public void setShortChg(Integer shortChg) {
        this.shortChg = shortChg;
    }

    /**
     * 获取交易所
     *
     * @return exchange - 交易所
     */
    public String getExchange() {
        return exchange;
    }

    /**
     * 设置交易所
     *
     * @param exchange 交易所
     */
    public void setExchange(String exchange) {
        this.exchange = exchange;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", tid=").append(tid);
        sb.append(", tradeDate=").append(tradeDate);
        sb.append(", symbol=").append(symbol);
        sb.append(", broker=").append(broker);
        sb.append(", vol=").append(vol);
        sb.append(", volChg=").append(volChg);
        sb.append(", longHld=").append(longHld);
        sb.append(", longChg=").append(longChg);
        sb.append(", shortHld=").append(shortHld);
        sb.append(", shortChg=").append(shortChg);
        sb.append(", exchange=").append(exchange);
        sb.append("]");
        return sb.toString();
    }
}